package com.chengcang.api.modules.log.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chengcang.api.modules.log.dao.SysLogOperateDao;
import com.chengcang.api.modules.log.dto.SysLogOperateDTO;
import com.chengcang.api.modules.log.entity.SysLogOperateEntity;
import com.chengcang.api.modules.log.service.SysLogOperateService;
import com.chengcang.common.service.impl.CrudServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 操作日志
 *
 * @author Zhanli xy321231@163.com
 * @since 1.0.0 2023-01-31
 */
@Service
public class SysLogOperateServiceImpl extends CrudServiceImpl<SysLogOperateDao, SysLogOperateEntity, SysLogOperateDTO> implements SysLogOperateService {

    @Override
    public QueryWrapper<SysLogOperateEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<SysLogOperateEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}